import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';

@Component({
  selector: 'app-my-component',
  templateUrl: './my-component.component.html',
  styleUrls: ['./my-component.component.scss']
})
export class MyComponentComponent implements OnInit {

  @Input() data: any;

  @Input() title: string;

  @Output() doLogin: EventEmitter<any> = new EventEmitter();

  loginJson = {
    user: '',
    password: '',
    isRememberPwd: ''
  };
  constructor() { }

  ngOnInit() {
  }

  login() {
    this.doLogin.emit('我执行了登录操作');
  }
}
